using System;
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;

namespace CRM.Models.Email;

[Comment("邮箱发件人表")]
[Index(nameof(OemId), nameof(CompanyId), nameof(GroupId), nameof(UserId))]
public class EmailSenderName : BaseModel
{
    public int Id { get; set; }
    public int UserId { get; set; }
    public int GroupId { get; set; }
    public int CompanyId { get; set; }
    public int OemId { get; set; }

    /// <summary>
    /// 发件人名称
    /// </summary>
    [Comment("发件人名称"), MaxLength(50)]
    public string Name { get; set; }

    /// <summary>
    /// 关联rushmail的EmailId
    /// </summary>
    [Comment("关联rushmail的EmailId")]
    public int? RushmailEmailId { get; set; }

    /// <summary>
    /// 最后一次使用的时间
    /// </summary>
    [Comment("最后一次使用的时间")]
    public DateTime LatestUsedTime { get; set; }
}